﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ParallelRuntimeLibrary
{

    [Serializable]
    public enum LoopFaultTolerance
    {
        /// <summary>
        /// Terminate the whole loop
        /// </summary>
        Terminate = 0,

        /// <summary>
        /// Igronre or terminate the iteration
        /// </summary>
        IgnoreIteration = 1
    }

    /// <summary>
    /// Specifies flags that control optional behavior for the creation and execution of tasks.
    /// </summary>
    [Serializable]
    public enum TaskCreationOptions
    {
        /// <summary>Specifies that default behavior should be used.</summary>
        None = 0,

        /// <summary>Specifies that a task is not attached to a parent in the task hierarchy. This also mean cancel the parent task will
        /// not cancel this task</summary>
        Detached = 1
    }

    [Serializable]
    public enum TaskStatus
    {
        /// <summary>
        /// The task didn't start yet.
        /// </summary>
        None = 0,

        /// <summary>
        /// The task is queued into task queue but it didn't start yet.
        /// </summary>
        Queued = 1,

        /// <summary>
        /// The task in-progress 
        /// </summary>
        Started = 2,

        /// <summary>
        /// The task is canceled
        /// </summary>
        Canceled = 4,

        /// <summary>
        /// The task is completed
        /// </summary>
        Completed = 8,

        /// <summary>
        /// The task is completed with exceptions
        /// </summary>
        CompletedWithExceptions = 16

    }

 

 

}
